<?
$section = $args->section;
$section_data = $args->section_data;

if($position_table = $config->tables[$section['position_table']]['table'])
{
    $table = new Table($position_table);
    $items = $table->select('select * from `'.$position_table.'` where section_id=:section_id order by sort',
        array(
            'section_id'=>$section['id']
        )
    );
}
?>
<section class="carou" id="<?=$args->section['alias']?>">
    <div class="wrap-carou">
        <ul id="carousel">
            <?foreach($items as $item){?>
            <li>
                <img src="<?=get_cache_pic($item['img'],1920,480)?>">
                <div class="carou-text">
                    <h2><?=$item['title']?></h2>
                    <span><?=$item['description']?></span>
                    <?if($item['btn_name']){?>
                    <a href="#form_request" class="robot"><?=$item['btn_name']?></a>
                    <?}?>
                </div>
            </li>
            <?}?>
        </ul>
        <div class="clearfix"></div>
        <div  class="next"></div>
        <div  class="prev"></div>
        <div  class="pager"></div>
    </div>
</section>


